import React, {Component} from 'react';
import {Router, Route, Switch} from 'react-router-dom';
import {createHashHistory } from 'history';

import Login from './views/Login/Login';
import Index from './views/Index/Index';
import NotFound from './views/NotFound/NotFound';

const history=createHashHistory();

class App extends Component {
    constructor(props) {
        super(props);
        this.state = {};
    }

    render() {
        return (
            <Router history={history}>
                <Switch>
                    <Route exact path={'/'} component={Login}/>
                    <Route exact path={'/login'} component={Login}/>
                    <Route path={'/index'} component={Index}/>
                    <Route component={NotFound}/>
                </Switch>
            </Router>
        )
    }
}

export default App;
